<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>超限测点</title>
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <style type="text/css">
        .mui-table-view-chevron .mui-table-view-cell {
            padding-right: 20px!important;
        }

        h5 {
            color: #0062CC;
        }
        .box{
  				position: fixed;
  				top:-5px;
  				left: 10px;
  				z-index: 1000;
  				width: 100%;
  				height: 40px;
  				display: flex;
  				align-items: center;
  				justify-content: flex-start;
  			}
  			.box>div{
  				color: red;
  				font-weight: 600;
  				background-color: yellow;
          text-align: center;
          margin-right: 10px;
          display: none
  			}
    </style>
</head>

<body>
		<div class="box">
			<div id="earlyWarning">物料预警</div>
			<div id="overflow">物料溢出</div>
		</div>
    <div class="mui-content">
        <ul class="mui-table-view mui-table-view-chevron" id="tmpList">
        	<script type="text/template" id="items">
            <ul class="mui-table-view mui-table-view-chevron">
              {{each datas as item}}
              <li class="mui-table-view-cell" onclick="goDetail('{{item.pointnum}}','{{item.measurepointid}}')">
               <div class="mui-table">
                 <div class="mui-table-cell mui-col-xs-8">
                   <h4 class="mui-ellipsis">测点编码:{{item.pointnum}}</h4>
                   <p class="mui-h6 mui-ellipsis" style='font-weight:700;color:#000'>测点名称:{{item.description}}</p>
                   <p class="mui-h6 mui-ellipsis">资产所属位置:{{item.location}}</p>
                 </div>
                 <div class="mui-table-cell mui-col-xs-4 mui-text-right">
                   <span class="mui-h5">资产:{{item.assetDescription}}</span>
                 </div>
                 </div>
              </li>
              {{/each}}
            </ul>
          </script>
        </ul>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script src="../script/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../script/common.js" type="text/javascript" charset="utf-8"></script>
<script src="../script/template.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var itemnum, locations, address, invbalancesid,binnum;
var page = 1
  apiready = function() {
    onLoadData(page, true);
    scrollToBottomHandler(function() {
        if (!loadEnd) { // 没有结束时继续加载
            page++;
            onLoadData(page, true);
        } else { // 告诉到底了
            EndToast('到底了');
        }
    })
    Refresh(function() {
        loadEnd = false;
        page = 1;
        onLoadData(page, false);
    });
  }
	function onLoadData (page, load) {
		ajaxrd("queryPointList", {
			location: api.pageParam.location || '',
      isOverRun: api.pageParam.isOverRun || '',
      worktype: api.pageParam.worktype || '',
      pointNumType: api.pageParam.pointNumType || '',
      cRegion: api.pageParam.cRegion || '',
      isClose: api.pageParam.isClose || '',
      pageNo: page,
      pageSize: 10,
      startDate: api.pageParam.startDate || '',
      endDate: api.pageParam.endDate || ''
		}, function(ret, err) {
      AddData('items', 'tmpList', ret.list, load);
      if (ret.list.length < 10) {
          loadEnd = true
      }
		})
	}
  function goDetail(num,id){
    openWin('status_monitoing_result','测量结果',{
        background: '#6098de',
        color: '#fff',
        rightButtons:[{
          iconPath:"widget://image/newPage.png"
        }]
    },{
        num:num,
        id:id
    })
  }

</script>

</html>
